home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1782 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: newsjunkie.ans.net!butch!sunfse!usenet
  2. From: Melnick Andy <melnick@lmsc.lockheed.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: SGI C++ volatile keyword and/or #pragma pack
  5. Date: 12 Jan 1996 23:36:32 GMT
  6. Organization: Lockheed Martin Missiles and Space Company, Sunnyvale, Ca.
  7. Message-ID: <4d6ra1$cvf@dialup.ese.lmsc.lockheed.com>
  8. NNTP-Posting-Host: limburger.ese.lmsc.lockheed.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1IS (X11; I; IRIX 5.3 IP22)
  13. X-URL: news:comp.lang.c++
  14.  
  15. We've encountered a difficulty (problem?) with the SGI Irix 5.3 C++ compiler
  16. (version 4.0?) in which the compiler apparently forces word/longword alignment
  17. within structures for word/longwords (2/4 byte variables).  We've tried
  18. specifying the "#pragma pack(n)" directive -- it works with the C compiler, but
  19. the C++ (CC) compiler fails with "warning(3247): unrecognized #pragma".  We've
  20. also tried specifying the "volatile" keyword in association with the structure,
  21. but apparently the compiler is ignoring our attempt at guidance.  Anybody know
  22. if there's a way to force the compiler to forego padding?
  23.  
  24.